Generic Programming for Dependent Types Constructing Strictly Positive Families
نویسندگان
چکیده
We begin by revisiting the idea of using a universe of types to write generic programs in a dependently typed setting by constructing a universe for Strictly Positive Types (SPTs). Here we extend this construction to cover dependent types, i.e. Strictly Positive Families (SPFs), thereby fixing a gap left open in previous work. Using the approach presented here we are able to represent all of Epigram’s datatypes within Epigram including the universe of datatypes itself.
منابع مشابه
Constructing Strictly Positive Families
In order to represent, compute and reason with advanced data types one must go beyond the traditional treatment of data types as being inductive types and, instead, consider them as inductive families. Strictly positive types (SPTs) form a grammar for defining inductive types and, consequently, a fundamental question in the the theory of inductive families is what constitutes a corresponding gr...
متن کاملA Universe of Strictly Positive Families
In order to represent, compute and reason with advanced data types one must go beyond the traditional treatment of data types as being inductive types and, instead, consider them as inductive families. Strictly positive types (SPTs) form a grammar for defining inductive types and, consequently, a fundamental question in the theory of inductive families is what constitutes a corresponding gramma...
متن کاملConstructing Universes for Generic Programming
Programming languages with an expressive language for defining data types often suffer from an excess in boiler-plate code and lack of re-usable, extendible libraries. Dependently typed programming languages are especially prone to such problems. With dependent types one can specify any number of relationships between data and types, to better specify the correct behaviour of programs. Thus one...
متن کاملA Recurrent Neural Network for Solving Strictly Convex Quadratic Programming Problems
In this paper we present an improved neural network to solve strictly convex quadratic programming(QP) problem. The proposed model is derived based on a piecewise equation correspond to optimality condition of convex (QP) problem and has a lower structure complexity respect to the other existing neural network model for solving such problems. In theoretical aspect, stability and global converge...
متن کاملGeneric Programming with Dependent Types
Generic programming Generic programming [15, 21] allows programmers to explain how a single algorithm can be instantiated for a variety of datatypes, by computation over each datatype’s structure. Dependent types Dependent types [28, 37] are types containing data which enable the programmer to express properties of data concisely, covering the whole spectrum from conventional uses of types to t...
متن کامل